<div id="top-panel">
    <div id="panel">
        <ul>
            <li><a href="<?php echo site_url("users/create"); ?>" class="report">Create</a></li>		
        </ul>
    </div>
</div>
<div id="wrapper">
	<div id="content">
		<div id="rightnow">
			<h3 class="reallynow">User list</h3>
			<?php if (count($users)): ?>
			<table width="100%">
				<thead>
					<tr>
						<th>Module name</th>
						<th>First name</th>
						<th>Last name</th>
						<th>Email</th>
						<th colspan="2">Task</th>
					</tr>
				</thead>
				<tbody>
					<?php foreach($users as $v): ?>
					<tr>
						<td><div style="padding-left:10px;"><a class="tool" href="<?php echo site_url("users/".$v['id']); ?>"><?php echo $v['username']; ?></a></div></td>
						<td><div style="padding-left:10px;"><?php echo $v['fname']; ?></div></td>
						<td><div style="padding-left:10px;"><?php echo $v['lname']; ?></div></td>
						<td><div style="padding-left:10px;"><?php echo $v['email']; ?></div></td>
						<th><div align="center"><a class="tool" href="<?php echo site_url("users/change/".$v['id']); ?>">Change password</a></div></th>
						<th><div align="center"><a class="tool" href="<?php echo site_url("users/delete/".$v['id']); ?>">Delete</a></div></th>
					</tr>
					<?php endforeach; ?>
				</tbody>
			</table>
			<?php else: ?>
				<p>No data to display</p>
			<?php endif; ?>
		</div>
	</div>
</div>